import request from "@/utils/request";

//权限接口
export const api_rights = () => request.get('rights/list');

//角色列表接口
export const api_roles = (data) => request.get('roles', data);

//删除角色指定权限
export const api_del = (url) => request.delete(url);

//添加角色
export const api_rolessave = (data) => request.post('roles', data);

//删除角色
export const api_delroles = (url) => request.delete(url);

//编辑提交角色
export const api_searoles = (url, data) => request.put(url, data);

//分配权限树接口
export const api_tree = () => request.get('rights/tree');

//角色授权
export const api_rolesrights = (url,data) => request.post(url, data);